-- GENERATED SPELL FOR [Ebon Knight] --


function spell0_32309(pUnit, Event) --@Blood Strike,n/a--
pUnit:FullCastSpellOnTarget(52374,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32309', 546, 1)
end

function spell1_32309(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(52375,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32309', 550, 1)
end

function spell2_32309(pUnit, Event) --@Death Grip,n/a--
pUnit:FullCastSpellOnTarget(57602,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32309', 0, 1)
end

function spell3_32309(pUnit, Event) --@Icy Touch,n/a--
pUnit:FullCastSpellOnTarget(52372,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32309', 20000, 1)
end

function spell4_32309(pUnit, Event) --@Plague Strike,n/a--
pUnit:FullCastSpellOnTarget(52373,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32309', 12000, 1)
end

function Sorts_32309(pUnit, Event)
local choix_sorts_32309 = math.random(0, 4)
if choix_sorts_32309 == 0 then
pUnit:RegisterEvent('spell0_32309', 1, 1)
end
if choix_sorts_32309 == 1 then
pUnit:RegisterEvent('spell1_32309', 1, 1)
end
if choix_sorts_32309 == 2 then
pUnit:RegisterEvent('spell2_32309', 1, 1)
end
if choix_sorts_32309 == 3 then
pUnit:RegisterEvent('spell3_32309', 1, 1)
end
if choix_sorts_32309 == 4 then
pUnit:RegisterEvent('spell4_32309', 1, 1)
end
end

function mob32309_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32309', math.random(1500, 3000), 1)
end

function mob32309_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32309_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32309_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32309, 1, 'mob32309_Action')
RegisterUnitEvent(32309, 2, 'mob32309_Leave')
RegisterUnitEvent(32309, 3, 'mob32309_Kill')
RegisterUnitEvent(32309, 4, 'mob32309_Die')
